package sf.sort;

import java.util.Arrays;
import java.util.Iterator;
import java.util.ServiceLoader;

public class TestSort {
    public static void main(String[] args) {
        final ServiceLoader<Sort> load = ServiceLoader.load(Sort.class);
        final Iterator<Sort> iterator = load.iterator();
        if (iterator.hasNext()) {
            final Sort next = iterator.next();
            final int[] unsorted = {12,15,1,18,2,35,30,11};
            next.sort(unsorted);
            System.out.println(Arrays.toString(unsorted));
        }
    }
}
